package com.zhoug.common3.beans;

import com.zhoug.common3.interfaces.NameTransformer;

import java.io.Serializable;

/**
 * @Author: zhoug
 * @Date: 2024-07-12
 * @Description:
 */
public class IntegerNameValue  implements NameTransformer, Serializable {
    private String name;
    private int data;

    public IntegerNameValue(String name, int data) {
        this.name = name;
        this.data = data;
    }

    public String getName() {
        return name;
    }

    public int getData() {
        return data;
    }

    @Override
    public String transformName() {
        return name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IntegerNameValue that = (IntegerNameValue) o;
        return data == that.data;
    }


}
